package com.jamin.aabill.ui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.view.Window;

import com.jamin.aabill.R;
import com.umeng.analytics.MobclickAgent;

public class InitActivity extends Activity{

	private static final int MSG_START_MAIN_PAGE = 0;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.init_activity);
		new Thread(){
			@Override
			public void run(){
				try {
					sleep(300);
					mHandler.sendEmptyMessage(MSG_START_MAIN_PAGE);
				} catch (InterruptedException e) {
				}

			}
		}.start();
	}

	

	@Override
	protected void onResume() {
		super.onResume();
		MobclickAgent.onResume(this);
		
	}
	
	@Override
	protected void onPause() {
		super.onPause();
		MobclickAgent.onPause(this);
	}


	Handler mHandler = new Handler(){
		@Override
		public void handleMessage(Message msg) {
			switch(msg.what){
			case MSG_START_MAIN_PAGE:
				startActivity(new Intent(InitActivity.this , AABillActivityGroup.class));
				break;
			}
			finish();
		}

	};

}
